let myname222: string = '我是一个好学生';
let mynumber: number = 666;
myname222 = '肯定的';
let doit: boolean = true;
const always: string = '123';
let list222: number[] = [1, 2, 3];
let list111: Array<number> = [2, 3, 4];
let myundefined: undefined = undefined;
let mynull: null = null;
let myvoid: void = undefined;
declare function create(c: object | null | string): void;
create(null)
create('string')
create({ nume: true });
const o: object = {
	name: '张三',
	age: 123,
	class: true
};
function addxy(x?: number, y?: number): number {
	return x + y;
}
addxy(6)
addxy(6, 9)
function joint(x: string, y: number): string {
	return x + y;
}
joint('lin', 123)
function joint1(x: string, ...y: string[]) {
	return x + y.join('');
}
joint1('张', '三')
joint1('l', 's', 'a')
function buildName(firstName: string, lastName = "Smith") {
	return firstName + " " + lastName;
}
buildName('zhang', 'ssadf')
function add1(x: number | string, y: number | string) {
	if (typeof x === 'number' && typeof y === 'number') {
		return x + y
	} else {
		return x.toString() + y.toString()
	}
}
interface Iinfe {
	readonly name?: string;
	age: number;
	size: string;
}
interface Iinfe1 {
	year: Iinfe;
	size1: string;
}
function printIinfe(objlv1: Iinfe1, objlv: Iinfe) {
	return objlv1.year.age;
}
let objlv = { age: 123, name: 'lv', size: '13' }
let objlv1 = { year: objlv, size1: '123' }
printIinfe(objlv1, objlv)
